﻿<UserControl x:Class="FastMVVM.Silverlight.Template.View.MainPageView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:core="clr-namespace:FastMVVM.Core;assembly=FastMVVM.Silverlight4"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400" Loaded="UserControl_Loaded">

    <UserControl.Resources>
        <core:DebugBinding x:Key="Debugger" />
        <Storyboard x:Name="sbShowMessage">
            <DoubleAnimation From="0" To="1" Duration="0:0:3"
                Storyboard.TargetName="tbMessage" Storyboard.TargetProperty="TextBlock.Opacity"/>
        </Storyboard>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot" Background="White">
        <TextBlock x:Name="tbMessage" Text="{Binding Text}" DataContext="{Binding Message}" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="40"/>
        <!-- If you want to debug the binding, you can put a Debugger Converter like this: -->
        <!--<TextBlock x:Name="tbMessage" Text="{Binding Text, Converter={StaticResource Debugger}}" DataContext="{Binding Message}" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="40"/>-->
    </Grid>
</UserControl>
